package com.taxt.ui.fragment;

import android.view.View;
import android.widget.ImageView;

import com.hjq.widget.view.DrawableTextView;
import com.taxt.R;
import com.taxt.aop.Permissions;
import com.taxt.aop.SingleClick;
import com.taxt.app.TitleBarFragment;
import com.taxt.ui.activity.DeclareDataActivity;
import com.taxt.ui.activity.HomeActivity;
import com.hjq.permissions.Permission;

/**
 *    author : wq

 *    time   : 2018/10/18
 *    desc   : 服务
 */
public final class MessageFragment extends TitleBarFragment<HomeActivity> {


    DrawableTextView mSearchTxView;
    public static MessageFragment newInstance() {
        return new MessageFragment();
    }

    @Override
    protected int getLayoutId() {
        return R.layout.message_fragment;
    }

    @Override
    protected void initView() {

           mSearchTxView=findViewById(R.id.tb_search_tx);
           setOnClickListener(mSearchTxView);
    }

    @Override
    protected void initData() {

    }

    @Override
    public boolean isStatusBarEnabled() {
        // 使用沉浸式状态栏
        return super.isStatusBarEnabled();
    }
    @Override
    protected boolean isStatusBarDarkFont() {
        return false;
    }
    @SingleClick
    @Override
    public void onClick(View view) {
        if (view == mSearchTxView) {
            startActivity(DeclareDataActivity.class);
        }

    }

    @Permissions(Permission.CAMERA)
    private void requestPermission() {
        toast("获取摄像头权限成功");
    }
}